package com.ly.service.house;

import com.ly.entity.SupportAddress;
import com.ly.service.ServiceMultiResult;
import com.ly.service.ServiceResult;
import com.ly.service.search.BaiduMapLocation;
import com.ly.web.dto.SubwayDTO;
import com.ly.web.dto.SubwayStationDTO;
import com.ly.web.dto.SupportAddressDTO;

import java.util.List;
import java.util.Map;

/**
 * 地址服务接口
 * @author ：LY
 * @date ：Created in 2020/11/10 21:13
 * @modified By：
 */
public interface IAddressService {
  /**
   * 获取城市
   * @return
   */
  ServiceMultiResult<SupportAddressDTO> findAllCities();

  /**
   * 获取城市对应的区
   * @param cityEnName
   * @return
   */
  ServiceMultiResult findAllRegionsByCityName(String cityEnName);

  /**
   * 根据英文简写获取具体区域的信息
   * @param cityEnName
   * @param regionEnName
   * @return
   */
  Map<SupportAddress.Level, SupportAddressDTO> findCityAndRegion(String cityEnName, String regionEnName);



  /**
   * 通过城市获取地铁名
   * @param cityEnName
   * @return
   */
  List<SubwayDTO> findAllSubwayByCity(String cityEnName);

  /**
   * 获取地铁线路所有站点
   * @param subwayId
   * @return
   */
  List<SubwayStationDTO>  findAllStationBySubway(Long subwayId);
  /**
   * 获取地铁线信息
   * @param subwayId
   * @return
   */
  ServiceResult<SubwayDTO> findSubway(Long subwayId);

  /**
   * 获取地铁站点信息
   * @param stationId
   * @return
   */
  ServiceResult<SubwayStationDTO> findSubwayStation(Long stationId);

  /**
   * 根据英文简写获取城市详细信息
   * @param cityEnName
   * @return
   */
    ServiceResult<SupportAddressDTO> findCity(String cityEnName);

  /**
   * 根据城市以及具体地理位置获取百度地图的经纬度
   * @param city
   * @param address
   * @return
   */
    ServiceResult<BaiduMapLocation> getBaiduMapLoaction(String city,String address);

  /**
   * 上传百度LBS数据
   */
  ServiceResult lbsUpload(BaiduMapLocation location,String title,String address,

                          long houseId,int price,int area);

  /**
   * 移除LBS数据
   * @param houseId
   * @return
   */
  ServiceResult removeLbs(Long houseId);
}
